/*
 * Copyright 2019-2025 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.iiifi.kite.security.enums;

import com.iiifi.kite.core.result.IResultCode;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Kite 返回结果 code
 *
 * @author kite@iiifi.com 花朝
 */
@Getter
@AllArgsConstructor
public enum KiteSecurityCode implements IResultCode {

    /**
     * token失效
     */
    TOKEN_IS_INVALID(200101, "登录状态已失效"),

    /**
     * token排他失效
     */
    TOKEN_IS_EXCLUDE_INVALID(200102, "您的账号在其他设备登录，请重新登录!"),

    /**
     * 账号冻结失效
     */
    TOKEN_IS_FROZEN_INVALID(200103, "您的账号被冻结，请联系客服!"),

    /**
     * 您的账号无操作权限
     */
    AUTH_IS_FORBIDDEN(200199, "您的账号无操作权限!");

    /**
     * code编码
     */
    final int code;
    /**
     * 中文信息描述
     */
    final String msg;
}
